diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-10-08 11:38:53 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-10-08 11:38:53 +0100 |
| commit | b0a288f03774d3df6f4502af7748a52012e05029 (patch) | |
| tree | 50aa09baec9467dfbe82cfda9e38aa001d9b31d1 /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenSwitchTests]/[method:canGenerateCodeForSwitchWithSingleResult(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | |
| parent | 74163c2028e8d09b66cc1bb8d8002aba1a14ffed (diff) | |
Generate Patio code for stack IR switch instruction
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenSwitchTests]/[method:canGenerateCodeForSwitchWithSingleResult(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
1 files changed, 59 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenSwitchTests]/[method:canGenerateCodeForSwitchWithSingleResult(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenSwitchTests]/[method:canGenerateCodeForSwitchWithSingleResult(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..a738ad65 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenSwitchTests]/[method:canGenerateCodeForSwitchWithSingleResult(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,59 @@ +Compilation unit elements: + + +Locals: + * (val "tmp__0" int) + * (val "tmp__1" int) + * (val "tmp__2" int) + * (val "tmp__3" int) + * (val "tmp__4" int) + * (val "tmp__5" int) + * (val "tmp__6" int) + +Instructions: + +( + ( + switch + ((local "tmp__0")) + (local "condition") + ( + ( + case + 0 + ( + block + ( + (local-store (local "tmp__1") (int 1)) + (local-store (local "tmp__2") (int 2)) + (int-add (local "tmp__3") (local "tmp__1") (local "tmp__2")) + ) + results=((local "tmp__3")) + ) + ) + ( + case + 1 + ( + block + ( + (local-store (local "tmp__4") (int 101)) + (local-store (local "tmp__5") (int 102)) + (int-add (local "tmp__6") (local "tmp__4") (local "tmp__5")) + ) + results=((local "tmp__6")) + ) + ) + ) + ( + block + ( + (unreachable) + ) + results=() + ) + ) +) + +Temporary stack: + * other |
